#ifndef SECURITYSETTING_H
#define SECURITYSETTING_H

#include <QtWidgets>
#include <QUdpSocket>
#include <QCamera>
#include <QCameraViewfinder>
#include <QCameraImageCapture>
#include <QCameraViewfinderSettingsControl>



namespace Ui {
class SecuritySetting;
}

class SecuritySetting : public QWidget
{
    Q_OBJECT
    
public:
    explicit SecuritySetting(QWidget *parent = 0);
    ~SecuritySetting();
    QString FaceImg;

private:
    Ui::SecuritySetting *ui;
    QUdpSocket *cliSocket;
    int state;
    QTimer *timer;

    QCamera *camera; //对系统摄像头进行封装
    QCameraViewfinder *viewfinder; //提供一个展示窗口
    QCameraImageCapture *CamerimageCapture;//对记录的媒体资源进行捕捉


private slots:
    void readPendingDatagrams();
    void on_startEdit_clicked();
    void timeSlot();
    void on_takePhoto_clicked();


    void captureImage();
    void displayImage(int,QImage);
    void on_save_clicked();
    void on_clear_clicked();
};

#endif // SECURITYSETTING_H
